// AUTO GENERATED CODE!
// CODE GENERATOR WILL NOT PRESERVE MANUAL CHANGES TO THIS CODE!
// 

// MIT License (MIT)
// 
// Copyright (c) 2014 K Ercan Turkarslan
// 
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// 
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
// 


using System;

namespace Mios.Generated.ServiceFiles
{
    // Generated from S_DigitalSecurityCameraStillImage1.xml
    
    public class DigitalSecurityCameraStillImage1Service : MiosService
    {
        #region AvailableEncodings : String;
        private String _mAvailableEncodings;
        
        public String AvailableEncodings
        {
            get
            {
                return _mAvailableEncodings ?? GetAvailableEncodings();
            }
        }
        
        #region Action GetAvailableEncodings() : String;
        public String GetAvailableEncodings()
        {
            _mAvailableEncodings = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "AvailableEncodings"));
            
            return _mAvailableEncodings;
        }
        #endregion Action GetAvailableEncodings
        
        #endregion
        
        #region DefaultEncoding : String;
        private String _mDefaultEncoding;
        
        public String DefaultEncoding
        {
            get
            {
                return _mDefaultEncoding ?? GetDefaultEncoding();
            }
        }
        
        #region Action SetDefaultEncoding(String reqEncoding) : String;
        public String SetDefaultEncoding(String reqEncoding)
        {
            if (String.IsNullOrEmpty(reqEncoding))
                throw new ArgumentNullException("reqEncoding");
            
            return Engine.Luup_CallAction(base.DeviceId, base.ServiceId, "SetDefaultEncoding",
                String.Format("ReqEncoding={0}", ToLuup(_mDefaultEncoding = reqEncoding)));
        }
        #endregion Action SetDefaultEncoding
        
        #region Action GetDefaultEncoding() : String;
        public String GetDefaultEncoding()
        {
            _mDefaultEncoding = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "DefaultEncoding"));
            
            return _mDefaultEncoding;
        }
        #endregion Action GetDefaultEncoding
        
        #endregion
        
        #region AvailableCompressionLevels : String;
        private String _mAvailableCompressionLevels;
        
        public String AvailableCompressionLevels
        {
            get
            {
                return _mAvailableCompressionLevels ?? GetAvailableCompressionLevels();
            }
        }
        
        #region Action GetAvailableCompressionLevels() : String;
        public String GetAvailableCompressionLevels()
        {
            _mAvailableCompressionLevels = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "AvailableCompressionLevels"));
            
            return _mAvailableCompressionLevels;
        }
        #endregion Action GetAvailableCompressionLevels
        
        #endregion
        
        #region DefaultCompressionLevel : String;
        private String _mDefaultCompressionLevel;
        
        public String DefaultCompressionLevel
        {
            get
            {
                return _mDefaultCompressionLevel ?? GetDefaultCompressionLevel();
            }
        }
        
        #region Action SetDefaultCompressionLevel(String reqCompressionLevel) : String;
        public String SetDefaultCompressionLevel(String reqCompressionLevel)
        {
            if (String.IsNullOrEmpty(reqCompressionLevel))
                throw new ArgumentNullException("reqCompressionLevel");
            
            return Engine.Luup_CallAction(base.DeviceId, base.ServiceId, "SetDefaultCompressionLevel",
                String.Format("ReqCompressionLevel={0}", ToLuup(_mDefaultCompressionLevel = reqCompressionLevel)));
        }
        #endregion Action SetDefaultCompressionLevel
        
        #region Action GetDefaultCompressionLevel() : String;
        public String GetDefaultCompressionLevel()
        {
            _mDefaultCompressionLevel = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "DefaultCompressionLevel"));
            
            return _mDefaultCompressionLevel;
        }
        #endregion Action GetDefaultCompressionLevel
        
        #endregion
        
        #region AvailableResolutions : String;
        private String _mAvailableResolutions;
        
        public String AvailableResolutions
        {
            get
            {
                return _mAvailableResolutions ?? GetAvailableResolutions();
            }
        }
        
        #region Action GetAvailableResolutions() : String;
        public String GetAvailableResolutions()
        {
            _mAvailableResolutions = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "AvailableResolutions"));
            
            return _mAvailableResolutions;
        }
        #endregion Action GetAvailableResolutions
        
        #endregion
        
        #region DefaultResolution : String;
        private String _mDefaultResolution;
        
        public String DefaultResolution
        {
            get
            {
                return _mDefaultResolution ?? GetDefaultResolution();
            }
        }
        
        #region Action SetDefaultResolution(String reqResolution) : String;
        public String SetDefaultResolution(String reqResolution)
        {
            if (String.IsNullOrEmpty(reqResolution))
                throw new ArgumentNullException("reqResolution");
            
            return Engine.Luup_CallAction(base.DeviceId, base.ServiceId, "SetDefaultResolution",
                String.Format("ReqResolution={0}", ToLuup(_mDefaultResolution = reqResolution)));
        }
        #endregion Action SetDefaultResolution
        
        #region Action GetDefaultResolution() : String;
        public String GetDefaultResolution()
        {
            _mDefaultResolution = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "DefaultResolution"));
            
            return _mDefaultResolution;
        }
        #endregion Action GetDefaultResolution
        
        #endregion
        
        #region ImageURL : String;
        private String _mImageURL;
        
        public String ImageURL
        {
            get
            {
                return _mImageURL ?? GetDefaultImageURL();
            }
        }
        
        #region Action GetDefaultImageURL() : String;
        public String GetDefaultImageURL()
        {
            _mImageURL = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "ImageURL"));
            
            return _mImageURL;
        }
        #endregion Action GetDefaultImageURL
        
        #endregion
        
        #region ImagePresentationURL : String;
        private String _mImagePresentationURL;
        
        public String ImagePresentationURL
        {
            get
            {
                return _mImagePresentationURL ?? GetDefaultImagePresentationURL();
            }
        }
        
        #region Action GetDefaultImagePresentationURL() : String;
        public String GetDefaultImagePresentationURL()
        {
            _mImagePresentationURL = FromLuupString(Engine.Luup_VariableGet(base.DeviceId, base.ServiceId, "ImagePresentationURL"));
            
            return _mImagePresentationURL;
        }
        #endregion Action GetDefaultImagePresentationURL
        
        #endregion
        
        
        #region Action GetImageURL(String reqEncoding, String reqCompression, String reqResolution, String retImageURL) : String;
        public String GetImageURL(String reqEncoding, String reqCompression, String reqResolution, String retImageURL)
        {
            if (String.IsNullOrEmpty(reqEncoding))
                throw new ArgumentNullException("reqEncoding");
            
            if (String.IsNullOrEmpty(reqCompression))
                throw new ArgumentNullException("reqCompression");
            
            if (String.IsNullOrEmpty(reqResolution))
                throw new ArgumentNullException("reqResolution");
            
            // WARNING: This version of code generator does not know how to generate Http Luup requests with out variables.
            // Below generated code may not function properly!
            // 
            
            return FromLuupString(
            Engine.Luup_CallAction(base.DeviceId, base.ServiceId, "GetImageURL"
                , String.Format("ReqEncoding={0}", ToLuup(reqEncoding))
                , String.Format("ReqCompression={0}", ToLuup(reqCompression))
                , String.Format("ReqResolution={0}", ToLuup(reqResolution))
                )); // Engine.Luup_CallAction
        }
        #endregion Action GetImageURL
        
        #region Action GetImagePresentationURL(String reqEncoding, String reqCompression, String reqResolution, String retImagePresentationURL) : String;
        public String GetImagePresentationURL(String reqEncoding, String reqCompression, String reqResolution, String retImagePresentationURL)
        {
            if (String.IsNullOrEmpty(reqEncoding))
                throw new ArgumentNullException("reqEncoding");
            
            if (String.IsNullOrEmpty(reqCompression))
                throw new ArgumentNullException("reqCompression");
            
            if (String.IsNullOrEmpty(reqResolution))
                throw new ArgumentNullException("reqResolution");
            
            // WARNING: This version of code generator does not know how to generate Http Luup requests with out variables.
            // Below generated code may not function properly!
            // 
            
            return FromLuupString(
            Engine.Luup_CallAction(base.DeviceId, base.ServiceId, "GetImagePresentationURL"
                , String.Format("ReqEncoding={0}", ToLuup(reqEncoding))
                , String.Format("ReqCompression={0}", ToLuup(reqCompression))
                , String.Format("ReqResolution={0}", ToLuup(reqResolution))
                )); // Engine.Luup_CallAction
        }
        #endregion Action GetImagePresentationURL
        
        
        #region Method SetVariable(String name, String value) : Boolean;
        internal override Boolean SetVariable(String name, String value)
        {
            switch(name)
            {
                case "AvailableCompressionLevels":
                    _mAvailableCompressionLevels = FromLuupString(value); return true;
                case "AvailableEncodings":
                    _mAvailableEncodings = FromLuupString(value); return true;
                case "AvailableResolutions":
                    _mAvailableResolutions = FromLuupString(value); return true;
                case "DefaultCompressionLevel":
                    _mDefaultCompressionLevel = FromLuupString(value); return true;
                case "DefaultEncoding":
                    _mDefaultEncoding = FromLuupString(value); return true;
                case "DefaultResolution":
                    _mDefaultResolution = FromLuupString(value); return true;
                case "ImagePresentationURL":
                    _mImagePresentationURL = FromLuupString(value); return true;
                case "ImageURL":
                    _mImageURL = FromLuupString(value); return true;
                default:
                    return false;
            }
        }
        #endregion Method SetVariable
        
        public DigitalSecurityCameraStillImage1Service(MiosEngine engine, UInt32 deviceId, String serviceId)
            : base(engine, deviceId, serviceId)
        {
            
        } //End Constructor
    } //End of class
} //End of Namespace

